import instance from '@/utils/request'

// 登录接口
export const login = (form) => instance.post('/users/login', form)

// 获取用户信息
export const getInfo = (token) => instance.get('/users/info?token=' + token)


// 用户信息分页
export const userPage = (form) => instance.post('users/page', form)

export const changeUserState = (form) => instance.post('users/state', form)

// 新增/编辑
export const insert_edit_user = (form) => instance.post('users/insert/edit', form)

// 根据id 查询用户信息
export const user_one = (id) => instance.get('users/one/' + id)

// 批量删除
export const batchRemove = (ids) => instance.post('users/remove', ids)

